<template>
	<view class="app-my-give e-p-20">
		<view class="e-radius-20 bg-white e-p-20">
			<view class="e-flex app-my-give__box">
				<view class="app-my-give__header e-flex e-flex-1">
					<view class="app-my-give__item1 e-p-l-20">
						<text class="c-333 e-font-24 fw-500">活动次数</text>
					</view>
					<view class="app-my-give__item2 e-p-l-20">
						<text class="c-333 e-font-24 fw-500">赠送数量</text>
					</view>
					<view class="app-my-give__item3 e-flex-1 e-p-l-20">
						<text class="c-333 e-font-24 fw-500">赠送时间</text>
					</view>
				</view>
				<view class="app-my-give__hron">
					
				</view>
			</view>
			<view class="e-flex app-my-give__box" v-for="item in list" :key="item">
				<view class="app-my-give__item1 e-p-l-20">
					<text class="c-333 e-font-24">第{{item.period}}次</text>
				</view>
				<view class="app-my-give__item2 e-p-l-20">
					<text class="c-333 e-font-24">{{item.money}}抵扣券</text>
				</view>
				<view class="app-my-give__item3 e-flex-1 e-p-l-20">
					<text class="c-333 e-font-24">{{item.createTime}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {ref} from 'vue'
	import { getProfitDetail } from '@/common/request/api';
	import { onLoad, onShow, onPullDownRefresh,onReachBottom } from '@dcloudio/uni-app';
	import { useCurrentInstance, useQueryPage } from '@/common/hooks';
	
	let params = {
		
	}
	const { showLoad, list, handleQueryPage, handleRefresh } = useQueryPage({
		api: getProfitDetail,
		option: {
			responseKey:'data.list',
			totalKey:'data.total',
		},
		pageSize:20
	});
	onReachBottom(() => {
		handleQueryPage(params)
	})
	onLoad((opt)=>{
		params = opt
		handleRefresh(opt)
	})
</script>

<style lang="scss" scoped>
	@include appBem_b(my-give) {
		@include appBem_e(line) {
			border-bottom: 1rpx solid #F2F2F2;
		}
		@include appBem_e(header) {
			height: 94rpx;
			background: #FAFAFA;
		}
		@include appBem_e(hron) {
			width: 8rpx;
			height: 90rpx;
			background: #999999;
			border-radius: 4rpx;
		}
		@include appBem_e(item1) {
			flex: 0 0 160rpx
		}
		@include appBem_e(item2) {
			flex: 0 0 200rpx
		}
		@include appBem_e(box) {
			height: 94rpx;
			box-shadow: inset 0px -1rpx 0px 0px #F0F0F0;
		}
	};
</style>